<?php
function cache() {
    global $datas;
    $id = $datas['id'];
    $p = $datas['p'];
    $data = json_decode(file_get_contents('https://api.live.bilibili.com/xlive/web-room/v1/playUrl/playUrl?cid='.$id.'&qn=10000&platform='.$p));
    return $data->data->durl[0]->url;
};